Archive for February, 2015

Stop Spammers and CloudFlare

Friday, February 27th, 2015

In previous version I was trying to work around CloudFlare in the Stop Spammers plugin. I would suggest to people that if they use CloudFlare that they must turn on the CloudFlare Plugin supplied by CloudFlare.

Unfortunately, only a few users actually do this and as a result the Stop Spammers plugin is not very effective for most people who use CloudFlare. If CloudFlare is an automatic feature provided by their hosting company, they might not even know it is there.

I just reversed my position and the plugin now detects CloudFlare and fixes the IP if it is found. It only does this if the CloudFlare plugin is not installed and active.

This is a real issue in that I need to update my plugin when CloudFlare changed its plugin. It would be much easier if every hosting company that uses CloudFlare as feature would correct the IP right in Apache so that PHP would always see the real IP.

I am running this website under CloudFlare using my plugin with the CloudFlare plugin turned off. Soon, CloudFlare will start caching pages and I should see hits with a CloudFlare IP. I will be able to tell then if the plugin works.

I have many new things in the plugin and I am eager to release it. CloudFlare is holding it up.

On a excited note, the coding of the CloudFlare fix got a little complicated and I thought suddenly that a GOTO would have solved the problem. I remember that PHP still supports a GOTO. I had the pleasure of putting a GOTO into my code and it works!!! I haven’t coded a goto in a high level language in 25 years. It was a great pleasure to to it. Dijkstra be damned!

Keith